import { singleRequest } from '@/utils/request'

// 查询记录
export const searchRecord = async (data = {}) => {
    const res = await singleRequest({
        url: '/express/record',
        method: 'get',
        params: data,
    })
    return res
}

// 查询公司
export const searchCompanyInfo = async (data = {}) => {
    const res = await singleRequest({
        url: '/company/downList',
        method: 'get',
        params: data,
    })
    return res
}
// 查询账号
export const searchAccount = async (data = {}) => {
    const res = await singleRequest({
        url: '/employee/account/downList',
        method: 'get',
        params: data,
    })
    return res
}

// 购买账号
export const payRecord = async (data = {}) => {
    const res = await singleRequest({
        url: '/payOrder/record',
        method: 'get',
        params: data,
    })
    return res
}
/**
 *@Description 获取用户标签.
 *@Return .
**/
export const getUserTags = async params => {
    const res = await singleRequest({
        url: '/data/list-tags',
        method: 'get',
        params,
    })
    return res
}
/**
 *@Description add 用户标签.
 *@Return .
**/
export const addUserTags = async params => {
    const res = await singleRequest({
        url: '/data/save-tag',
        method: 'get',
        params,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
        },
    })
    return res
}
/**
 *@Description 删除用户标签.
 *@Return .
**/
export const delUserTags = async data => {
    const res = await singleRequest({
        url: '/data/del-tag',
        method: 'delete',
        data,
    })
    return res
}
/**
 *@Description 获取客户 成功 列表 1005.
 *@Return .
 **/
export const customerSucList = async params => {
    const res = await singleRequest({
        url: '/common/dic-list',
        method: 'get',
        params,
    })
    return res
}
/**
 *@Description 保存或修改公司信息.
 *@Return .
 **/
export const saveChanges = async data => {
    const res = await singleRequest({
        url: '/data/save-company',
        method: 'post',
        data,
    })
    return res
}
/**
 *@Description 查询公司信息.
 *@Return .
 **/
export const getCorpPage = async data => {
    const res = await singleRequest({
        url: '/data/page',
        method: 'post',
        data,
    })
    return res
}
/**
 *@Description 获取经销商信息.
 *@Return .
 **/
export const getDealer = async params => {
    const res = await singleRequest({
        url: '/data/list-dealer',
        method: 'get',
        params,
    })
    return res
}
/**
 *@Description 数据统计-企业信息管理-导出企业列表 - 导出.
 *@Return .
**/
export const companyExport = async data => {
    const res = await singleRequest({
        url: '/data/company-export',
        method: 'post',
        data,
        responseType: 'arraybuffer',
    })
    return res
}
/**
 *@Description 数据统计-企业信息管理-导出企业及下属账号列表 - 导出.
 *@Return .
**/
export const companyDetailExport = async data => {
    const res = await singleRequest({
        url: '/data/companyDetail-export',
        method: 'post',
        data,
        responseType: 'arraybuffer',
    })
    return res
}








